package org.alis.smallcc.designpatterns.behavior.mediator;

public class Main {
	public static void main(String[] args) {
		// 创建一个中介者
		Mediator mediator = new ChatMediator();
		// 创建三个动态人
		Colleague collSend = new AlisColleague("lc", mediator);
		Colleague collRelTwo = new LowColleague("eosio", mediator);
		Colleague collRelOne = new LowColleague("smallcc", mediator);
		
		// 创建一个消息
		Message message =new Message();
		message.setMessageBody(" 我要收租了");
		message.setMessageType("send");
		collSend.send(message);
		
		message.setMessageBody("你收了个寂寞");
		message.setMessageType("receive");
		collRelOne.send(message);
	}
}
